package org.example.myleet.rosalind.grph;

import java.util.ArrayList;
import java.util.List;

public class Solution {

    private static final int K = 3;

    public List<String> buildOverlapGraph(String input) {
        List<String> result = new ArrayList<>();
        String[] lines = input.split("\n");
        List<Sequence> sequences = new ArrayList<>(lines.length / 2);
        StringBuilder sequence = new StringBuilder();
        String tag = null;
        for (String line : lines) {
            if (line.startsWith(">")) {
                String t = line.substring(1);
                if (sequence.length() > 0) {
                    String prefix = sequence.substring(0, K);
                    String suffix = sequence.substring(sequence.length() - K, sequence.length());
                    Sequence seq = new Sequence(tag, sequence.toString(), prefix, suffix);
                    sequences.add(seq);
                    sequence.delete(0, sequence.length());
                }
                tag = t;
                continue;
            }
            sequence.append(line);
        }
        if (sequence.length() > 0) {
            String prefix = sequence.substring(0, K);
            String suffix = sequence.substring(sequence.length() - K, sequence.length());
            Sequence seq = new Sequence(tag, sequence.toString(), prefix, suffix);
            sequences.add(seq);
        }
        for (int i = 0; i < sequences.size(); ++i) {
            Sequence seqI = sequences.get(i);
            for (int j = 0; j < sequences.size(); ++j) {
                if (i == j) {
                    continue;
                }
                Sequence seqJ = sequences.get(j);
                if (seqI.suffix.equals(seqJ.prefix)) {
                    result.add(seqI.getTag() + " " + seqJ.getTag());
                }
            }
        }
        return result;
    }

    static class Sequence {
        String tag;
        String sequence;
        String prefix;
        String suffix;

        public Sequence(String tag, String sequence, String prefix, String suffix) {
            this.tag = tag;
            this.sequence = sequence;
            this.prefix = prefix;
            this.suffix = suffix;
        }

        public String getTag() {
            return tag;
        }

        public String getSequence() {
            return sequence;
        }

        public String getPrefix() {
            return prefix;
        }

        public String getSuffix() {
            return suffix;
        }
    }

    public static void main(String[] args) {
        Solution solution = new Solution();
        printResult(solution.buildOverlapGraph(">Rosalind_0498\n" +
                "AAATAAA\n" +
                ">Rosalind_2391\n" +
                "AAATTTT\n" +
                ">Rosalind_2323\n" +
                "TTTTCCC\n" +
                ">Rosalind_0442\n" +
                "AAATCCC\n" +
                ">Rosalind_5013\n" +
                "GGGTGGG\n"));
        printResult(solution.buildOverlapGraph(">Rosalind_1276\n" +
                "ATACAGTTGGTTAGTGCTGTGTGAACCATGCCGCGGCAGACCGAATGCGCTCCCGAGCTG\n" +
                "ACTCGAGTTTAGTAGTGAGGTGGATGTCAATAGGTA\n" +
                ">Rosalind_6928\n" +
                "AGCGCCGCATAACACTAAAGCGTGGCTGGTTTGCGATCATCATAGTATGCCCTTATTTGA\n" +
                "TGCTGAAGCACAGATTAACGAGTAGGGGAGCT\n" +
                ">Rosalind_6765\n" +
                "AGGCCAAACCGTAGTACAAAGTCATAGTTGGTGGCATACACAAGGGTAAACGGCGAACTA\n" +
                "GTCCGAAAAATAACGCAGTGGAAGTGGGGCTAT\n" +
                ">Rosalind_3465\n" +
                "TAGCCGAACTTGAGAACAACCGACCGTGCGATATTGGTTCAAACTCTCGTCTTGACTCTA\n" +
                "TATTGTACATAACGAATCCC\n" +
                ">Rosalind_8492\n" +
                "ACAGAACCACCACCGCTCGGCCAAATGATCACCTATGCACCTGGCCGGGTCCACGGACCT\n" +
                "ATAACTAGAATAGCTAGTAGCATTAGAGGTAATACGTGG\n" +
                ">Rosalind_7148\n" +
                "CCTGCTCCTTCGTAGTATCTCTAATTGGGCCCATCCCACCGGGGCAACGGAACCCTATGC\n" +
                "ATCTATAAATCCAAAGCGAGCCACGACAGTAT\n" +
                ">Rosalind_8715\n" +
                "CCGTTAACCTGATAGCACAATACTCACGGACAGCTACCTACAGATAGACTATCCAAGGGG\n" +
                "CATCTAAGTGGTAGGAGAACCACAGCCTTAATACTC\n" +
                ">Rosalind_8540\n" +
                "CAGGGTCATCCTGGGTTACCTTACTAGCGAAGTTCCTTATATTCATGCTAGACATACTTG\n" +
                "CCCCGCTCAATTCCCCCCTATGAAACTGAGGACAGCTTAA\n" +
                ">Rosalind_7748\n" +
                "ATCGACGTCTCTCCGATCCGCCCAGGATACAGACGCCGCAATCCTCACTACCGTCAGCTA\n" +
                "GCGCGTTTTTCTTCAAGCAGAAGGC\n" +
                ">Rosalind_8985\n" +
                "AGTTCGGTAACACCCTTCGCGATGCTTAATCAGCCGTCTTGACACCACCCGGACAATGCT\n" +
                "TCGCTTTACTCCAATTGCGCAGCG\n" +
                ">Rosalind_1860\n" +
                "CGCTGCGGAGCTACAGTTCTGCAATGTATGGGATTGTTGACACGCTCAAAGAGCGGGACC\n" +
                "GCCTGTGTGGATCTCGACCAACTGGGAGCCGGAGCGGGTT\n" +
                ">Rosalind_1082\n" +
                "TCTGATACGCTCGCGGTCTCAGACTCGCCATCGAGAGGGACAGGTGGCCTAAAGGTCTTG\n" +
                "CCGTCATGACTCCACATAAA\n" +
                ">Rosalind_1584\n" +
                "CCGCATAAAGGCCCCTTGATTACCTTGCGTAGACCTTGGCGGCGTTCTGTCCCTTTACCA\n" +
                "AGAAATTGTGACAGGACCTTAGTG\n" +
                ">Rosalind_3934\n" +
                "TTGGCTGCATTCGCCTGTATATATGGCGGGTTACGAGAGGGCCTACATTGAACCTATACG\n" +
                "ATGAGCGAGTACTGTCCGCTAGCGGGC\n" +
                ">Rosalind_9387\n" +
                "GTCCTGCCCCGCCGTGGTCGCTTCACAACTTGACAGAATACCTCATAAAACGTAAAGTCA\n" +
                "ATCTTGCTTTTGCCCCACAGCCG\n" +
                ">Rosalind_1872\n" +
                "CGCGATCCTCGGGTACGCGATCATCCTGGTTCAAGCCCGGCAGGCGAAGACCTTACTTGA\n" +
                "AACTAGGAACACCCCACGCCTTCA\n" +
                ">Rosalind_3378\n" +
                "CGCAGGGAGCAGTGCTTGAGAGCAGCCTAAGCACTGGGTAGCTAACTATATAAACTAGCG\n" +
                "CTCTTAGAGTTTCATGTAATGGTTCGGAGAAG\n" +
                ">Rosalind_9139\n" +
                "GGTCCCCGATCCTAACCCATCATGCCAGCTGGATATTAGATGGTAATGGGACTTAAGAAT\n" +
                "CACTCCTCTAGCGAATCTGGTGCGTTAGTGGTCTCT\n" +
                ">Rosalind_0401\n" +
                "GGTTCCCCCCACCAACGTTGCTGAATGGTTAGCGGAATTTAGCGAGGTGTTGAAACTCTC\n" +
                "CGAGATGCTGCCGTTTCCGCACCGCAACTC\n" +
                ">Rosalind_5439\n" +
                "TTGAAGACAGGCCGCCGGCCCTCGCCAGGTAGGTCCCCAACGATTGCTCGCATACCGAGC\n" +
                "TTTATGCCAGTGTTCCCACTA\n" +
                ">Rosalind_6283\n" +
                "GACTATGTCAAGAAACCGGCTCGAGCTATCATCGATACCGAGCTAGGATTCTGTGATCCG\n" +
                "CCACTGACCGCCCAGTCCCGTTTACCC\n" +
                ">Rosalind_8397\n" +
                "ATGCCGTACACCGACCCGGGCTACGAACGTATATTTATTTGCACAGTTTATTCCGGGGGC\n" +
                "GTAGAGCTCCCCCCGGGTCCA\n" +
                ">Rosalind_4066\n" +
                "ACGGAAATACGAATACCATAGTCGATCGGATCTTCAGGACGCTCCAGGGACCTAGAGCCA\n" +
                "GTTTTTCGAATAGCGCTGGGATTGCCAACCCCATAATTG\n" +
                ">Rosalind_9320\n" +
                "CACCGACAGCAAGACTTGATCGTTAGAAGTCGCCCTCAGCTGGTAAAGCTGCGGTCTACT\n" +
                "GGACGCAGGGGACACCCCCGGTCCTCAAGTATTCC\n" +
                ">Rosalind_6931\n" +
                "TGAATGAGGATAAGGGGTAAGATACGTAAGCATATTTCAAGGACATAGCACCAGGCTGGG\n" +
                "ATACCATCTGTTGGAATACGACAAAACTACCACCGCTC\n" +
                ">Rosalind_2686\n" +
                "TGTTTGATGGACCTCACTGCTGTTCCCCAAGTGCAATTTTTCCAGCTACCGGGGATTAGT\n" +
                "CCTTCCGTACCATTAAGGCGAGTGCTCTGTCATAACG\n" +
                ">Rosalind_2073\n" +
                "AGACGTCTTCTTATCGAGTTAAACCTAATCCATTTGGGACATAAAATCGAAGGCATCAAA\n" +
                "CCACCTTCTTAGACTTAAAGTGTACCCGGGTAGTGCG\n" +
                ">Rosalind_5629\n" +
                "GATGTGTGTCGGACAAACAGTTAGCCAGTTAATAACTAAAGCTCAGTCACCGCGGCCCAA\n" +
                "AGCTGTAACCCGAACCTGGGGTCCCCCCTCCGCCAGAACG\n" +
                ">Rosalind_8658\n" +
                "TCTTATAAATCATATGCTTGTTTGCTTTTTAAGTATAGAACCAGGGTGTGTTATTTAGTC\n" +
                "GGCAGTGCAGACAGTTCTTCCGAATCAAAGA\n" +
                ">Rosalind_1315\n" +
                "AAACCCCGTAGTCCATTGCAGCGTTAGGCGCCTTCGTTACACGATTCGAGAGACAGCACT\n" +
                "CGGAAAAACTCGATTACTTGTCGGGGCATCTCGTGCTT\n" +
                ">Rosalind_9290\n" +
                "ACTTTAGATTACTCCTATCTGTCATTTCCAGCTTAATCGCTCGGGACGCCTCTCATAAAG\n" +
                "TTAGGGAGATCCGATAATCGGAGTAA\n" +
                ">Rosalind_5221\n" +
                "TTTAAGGAACGTGAGGGCCGGGGGAAACACCACGCCGTCCTAACTACATGTGCCGTCGAC\n" +
                "TCGACTTCACAGTAAGTGTTGTGCGAAGTAGT\n" +
                ">Rosalind_4588\n" +
                "TGCGTCGCTATTTTGAATCTTTGGAGCGAACCTAAGCGTTCTCGGCGAGCGCCGGGTAGG\n" +
                "GGAACGATGCGTATTATTTCCGTCGGGACTGCTGAT\n" +
                ">Rosalind_6790\n" +
                "TTAGCGTAATTTGCCGAGAGTTTGAACCTGGCAGTGCCAAAGTACCGGAACTTCTGCTCT\n" +
                "ATCCGGCGGATATCGATCGTTCTTCGCCAC\n" +
                ">Rosalind_3313\n" +
                "CTAATGACAGCAACTCTAACATCGGGTCCCTAGCATGTTTAGTGATTATCCTCTATCACC\n" +
                "GACCCGAGGGTCATGTCCCAC\n" +
                ">Rosalind_0993\n" +
                "CCGACGGGCGGCCCCCGGGATGGGAGGTCGTGCAGCACGCCGGATACCAGTGGGGCGCCA\n" +
                "CTCCTCTATTCGCTAGGCGT\n" +
                ">Rosalind_3013\n" +
                "GCGATACATGACAGACGTTTGGCCCGCACTCAGTCTACACAGAGATTCCCCTAGTCGTTT\n" +
                "TTGCAATCTGTACTTTCAAAGTCA\n" +
                ">Rosalind_1285\n" +
                "TTATTTTGCATTCGGCGTCGTCAACCGCTCACTGGCGAGGTCTCCAGACCGCAGGAAAGA\n" +
                "TGATTCTGAGACCTCATAGC\n" +
                ">Rosalind_4547\n" +
                "TAAGTGTTTCATATAACAAAGGGGGGCCGACTCGCGCCTTCTGCAACAGTGCTTCATAAA\n" +
                "GCGATCCAAATCTTGCAAGCCTCTTATC\n" +
                ">Rosalind_0671\n" +
                "CGGCCGAGGTCGACAGGTGTCACGATGTGCAGGTCGGTAGCCTCACACAGCCGATACAAT\n" +
                "TACACCCCTTATTCAGCCCCTATTACTCATAG\n" +
                ">Rosalind_9144\n" +
                "AGTGCAGCGCACTAACTGGTATTGGTACGATTCCTTAAATAACGTGAACATACCACGGGT\n" +
                "TTTATCCCTTTGAATTACTCCCTCT\n" +
                ">Rosalind_4427\n" +
                "ACATCTGATCTTGTTGGTTGATGAGCGTTAACTACACCTGAACCCGCACGGGGCGTCTCC\n" +
                "TGATGGCAACCCCAGTCAATTGGACCAAGGG\n" +
                ">Rosalind_4140\n" +
                "CCGAGATTACATAGCGACTTCCTAGCAGCTCAGAGCAAGGGAGGTCAACCAGCTTCAAAA\n" +
                "TCCGATGAGTAATCACTCATGTAAACACCAA\n" +
                ">Rosalind_8380\n" +
                "GAGACCAGGTTTCGTCCTATTATGTGGTATGTCGCTGTTACAGGAAGTTAGGCCAGTGTA\n" +
                "CTATTTCAGGCATCCCTATTGCGCCC\n" +
                ">Rosalind_7502\n" +
                "CCACCAAGTCGGACTTTTTCACGACAAAGGCTGTGCGCGGGTTCCTATTGGTGCCTTTAC\n" +
                "GACTTACCAGTGATAAACTTCT\n" +
                ">Rosalind_0942\n" +
                "TCTATCACCCGTCTCTCCGGAGAATGAACACCTTCGAAGCGTACGTCACTTTCTGTAGAG\n" +
                "ATATAATGGGACCGCGTAAATGTTGACGAGTCTATTCCA\n" +
                ">Rosalind_8624\n" +
                "GAGTCCTACAGGGTCATGGATGGGTACTGGGGCTATGACGGACCTGTCACTCTGCTGGCC\n" +
                "AGGGGACATGGCACTCTCCAGCCAACATAAG\n" +
                ">Rosalind_1704\n" +
                "TCTGATCTCCAATTCAAACTAGAGGGTGCGTAAGCATTCAAAATTGGAAGTAACCGGTAT\n" +
                "TCAGAGGAGCCGCTCGCAGCGAGCTAAGTACGTTAACT\n" +
                ">Rosalind_0095\n" +
                "GCCTATTTTCTGACAAGGATTGCAACTGTTCCGGCATGGTGGAATATAGTATTTTAAATA\n" +
                "GGGCATTACCAATTAAAGTCAGG\n" +
                ">Rosalind_8111\n" +
                "ATGAAGGTTCGCAGCTCCCAAAACCCAGCGCTAGATCAGGTATCTTCCGGGCGCCAATTC\n" +
                "AATGCGTTAGATCTAAAGGGTCTACATA\n" +
                ">Rosalind_2193\n" +
                "CACAATACTCAGCTTTGATACTTCACGATATGATGGAATTTTGGCTCGGGGAGGCTCTTG\n" +
                "CCCGCGCCATGTTACGCAAAGGTGTTCACGGCAC\n" +
                ">Rosalind_8770\n" +
                "CTTTCATCGGTTAGGTATCAATGGTAAAATCTGGCGCCAGACATCCACTGTGCTGTGGTA\n" +
                "TCGTTGCCCCGCCTCCGGGCGCTTTACAT\n" +
                ">Rosalind_9467\n" +
                "TGGTCGCCACAATGCAGCGAAGGCGCCCGGGGTTTAGTGAGGATCCAGTTCGACTAGTCG\n" +
                "CCAATCTACAATTGAGGACTTG\n" +
                ">Rosalind_3539\n" +
                "CCATCCAGCCCGGCCTAATCCGACGCAGGGGTGGGGGTACCTTCATTTCCCTAAAGCCAA\n" +
                "CTCGGCCCAGCTGATCAACGGCCATTTGCACATTG\n" +
                ">Rosalind_4853\n" +
                "CCCAATATAGGACACCTGTGGCAAGCAGAAACAATTCTTCCTTATGAACTATAGGGCCCA\n" +
                "CACACGCTTTCATACGATATCGACG\n" +
                ">Rosalind_4008\n" +
                "ATAGGCTTAACATGGTACCGAACGTGTAAGGTCTGCCCAACAACACAAAACCAGGAGGGT\n" +
                "GAGATCATAGTCATTCTCATACGAT\n" +
                ">Rosalind_5651\n" +
                "TGCAAGTTTACTATCCCTGTGGCAGCCCTCACCATTCCGATTGAAACATTCACACCGCAG\n" +
                "GGGTCCGAGCTGTCCAACAC\n" +
                ">Rosalind_2945\n" +
                "ATATTTGGAGAGAAAGTACCTCCGGGCAGAGGCACTTAAACCTCAGACCACCTTACCGTT\n" +
                "CGATTAACAAGCTGAGATGGAGAGTCATACCATCAGCGG\n" +
                ">Rosalind_7881\n" +
                "TCTTGCACCGCGACCTTTCAAGCGGAGAGTATCCCCGAACGATCAAGTCACTCGGAGGAT\n" +
                "CGATGGGGTTAATAGCGAACTGCTAACCGATTGGGA\n" +
                ">Rosalind_1311\n" +
                "CATGCCGTAGCTATCCGTGGGGGGGACAAATACGCATGTTGCCCCCTGGCTTTCCAGAGT\n" +
                "ACAAAACTTTCAGTTGCAAAGGGCAACTGTGT\n" +
                ">Rosalind_3718\n" +
                "CTGCCGGACTATGGTGGATAACGTGTCTAGCGCTCAACATGCCGTGGTCACCTGCCTAGT\n" +
                "TCCGCCTAGGAACCGGTCTT\n" +
                ">Rosalind_1579\n" +
                "ATTAGCTACTTGAGCTATTCCACATGTTAGCCAGGGTCGACTTACATCTTGGCGTGCAGC\n" +
                "GATGATGTGAAAGGGAAGGACCGGCCTATACTA\n" +
                ">Rosalind_5068\n" +
                "CGAACATCTAGGTTTAATAGCACCATTACATCGGGTCACTAACGATTTACACAAGATTCG\n" +
                "GATAAATGGACAGCGTGGTAGCACACGT\n" +
                ">Rosalind_3470\n" +
                "ATCCAGCTTCACAGTCTACATAAGGGGACTCGACCCGCTGGTCTCACGGTATAACGTTTC\n" +
                "GCCCATCCCGTCTGACATCTACGTTCCTG\n" +
                ">Rosalind_4327\n" +
                "GATTCTCTCCACGGCTACTTCATGGACCGACGAAGCGCAAAATACAGAGCACCTAGGGCT\n" +
                "GAACCCTTACACAACCCGCAGGAGACCTGCTTC\n" +
                ">Rosalind_5861\n" +
                "CTCTGGAGGGGACCACGTAAGACCTTATAACGGTTTTACAGCTGAACGTGACATTTCCAA\n" +
                "GAGGGCCGATTCGCTGAAAGTCTAGTGGGCCATTCA\n" +
                ">Rosalind_1836\n" +
                "TTCCCTGTGGTATGTAGCTGAGTCGGCTCCATTTTTCTAGTTTGTTCATATGTACCTCAT\n" +
                "TGATTCCTTACCTCCATCGATGTCGAACT\n" +
                ">Rosalind_9200\n" +
                "AGCCCCTCCCCGACAATTGGGTCTCTTCGGCGATAGTGAGTTATACTCCTGTTCTAGCCG\n" +
                "TCTCAGCGAGCTAAGTGCCGAAC\n" +
                ">Rosalind_9485\n" +
                "TGAAACGTTCGGGTCATCCTGCGACTTGCTCAAAACCTGGTCCCGTGGACGATTCCCCAT\n" +
                "GGAGATTATTGCAATTTCGCGAGTAAAA\n" +
                ">Rosalind_5926\n" +
                "AATATCTGGAACGGTGACTTCTCGAGCTGATCTCTCGTTTTAGACTTATAACATCTAATT\n" +
                "GCTACGCACGATCCGCCGTGCACCGCAACG\n" +
                ">Rosalind_4912\n" +
                "GCTCAGAGTGAGCATACATCAGGGAGGATCATGGGTTTATACAGCTGTTTCACGGAATCT\n" +
                "ATGTAGAGTCTCGTAACGCATTGGGGAAA\n" +
                ">Rosalind_9076\n" +
                "CCGGGGGGCCGACGCGGACACGGCAGGGGGCTCGTAGCGCTATGGACCGCTGTTGTAGTA\n" +
                "CCGCTATCGGGCGTAGGGTTTCTTTAGCGCGAAGCGGAT\n" +
                ">Rosalind_7892\n" +
                "TCGTCAATCTGGAACTTTGAGGTGGAAGGTGGGAGTAGCGGATGCGTCATCCTTCCCGTG\n" +
                "ACAATAAAGACGATAACGCGAACTGGTGTACGCTCG\n" +
                ">Rosalind_4541\n" +
                "TGATTTGCAGCGACTCTCAACTTTAGTTATAATAGTCTTCAACATGGAGTACCCGCATCT\n" +
                "CCGCTGTGTCAATAAAGGCAACCGGGCTTGACATA\n" +
                ">Rosalind_4039\n" +
                "CGACGGCACCTTGCGGGTACTGTTCATGACGTTCTTCCCCACTGCGTGACGAAGGCAACT\n" +
                "TAGGAGGAGTAAAGATGCATGTTCCGCCTAGCGCTACT\n" +
                ">Rosalind_8877\n" +
                "GTCGCAAGACAAATCTCAGGTAGGAGTGGAAATACGTGGACCCCTACGTTGGGCATGTAC\n" +
                "GAGGCCTCAACGTTACGTGTCCAAGATGGGTTAACAT\n" +
                ">Rosalind_6025\n" +
                "CTGGAGGAATGTTAGCTTTTTCTGTTAAGTTAATGTCTTCCGAGCGAGTAAGGGTACCGA\n" +
                "TGAACCTGTTTAGTTCCCGAGTGCCATTAGAGCACG\n" +
                ">Rosalind_7224\n" +
                "AAGTGATAGCGTCATACATTGGTAGTAAGGCCGGAAGTGTTTTATTAATGCGCTCGGCTA\n" +
                "CTCCTCCTCGCGTCACCTCAATTTGTGCAGGGGC\n" +
                ">Rosalind_8416\n" +
                "GAACCGCACACTGCTCCTTGGACCTTGAAATTACTCTTTCTCCTGCCGCCATGGTTGGGG\n" +
                "AGAAATCCTTTCTGTTAATGACAATCCG\n" +
                ">Rosalind_0838\n" +
                "AAGTAAACTGGACCTTTAGGTGAAATGGTCCATTCGGGCAGAATGCAACGTCAGGTTATT\n" +
                "TAGACGACGCATTCTCCGGACACAGCTATGGGCTGAGTTA\n" +
                ">Rosalind_4347\n" +
                "GCAGACCCACGCAAATGACCTCCCTTTGCAGTGTTGGAGCCTGACGGGTTTGCGAAGAAA\n" +
                "TAGATAAGACTACTCATCCTGACA\n" +
                ">Rosalind_6420\n" +
                "TGGGCGAACGCAACAAGGTGTGCCGAAATTTAAGTGCACTGAAGTTCCGGTCGGCAACTG\n" +
                "ATTAGGTCTTGTGCGCTTGATAACATGACAAG\n" +
                ">Rosalind_6672\n" +
                "CAGTATGCTCTAAACTCATGCGTGCGAGACTGGTACAGATAGATACCATCATATCCCGTC\n" +
                "ACCCTGTCGCATATAAGCCGGTC\n" +
                ">Rosalind_5391\n" +
                "CGGCCCAGGTTATGGAAGGTCCTCCACAGATACCCGTAATGCAATTAACAGATGATCTTC\n" +
                "AGATAACAACCCGTCAGACTATGCAA\n" +
                ">Rosalind_5280\n" +
                "ACCAAGGTTGCTTCACCAGTATCCAGTGAATAAACAAGCATTTTAAGGGAGGAAGCGGAG\n" +
                "AAGGCGATGAGCCGATCCACGACCAGTACGAA\n" +
                ">Rosalind_1322\n" +
                "ATGCGCTGTAGCCGAGACACTGATGTCTAGTAGTCGTAGCCATAAATTCTTCCTTGGCGC\n" +
                "CTGGAGTATGGAACTCTGAAA\n" +
                ">Rosalind_1663\n" +
                "TCCGGACTTACCAGCCCTGATCTTCCGAAGCTTGTTAATCACCGAGTTTAACACCAATCC\n" +
                "ACTATACCGTCACTTATTCCAGTCAAATAT\n" +
                ">Rosalind_5628\n" +
                "CAGTCCGGATCGGTAGACGCCACTTGGCGCATCGGCCCCCGCACAGTATAAGTTAGACTC\n" +
                "ACGATTAATGTCTACGTTCGGATTGCGAC\n" +
                ">Rosalind_0713\n" +
                "GTCAGAGTGGCATCTTCGCTCCAATACGTGCAAGGTAAAGTGTAGGGAATCAGTCTAAGT\n" +
                "TTTATTACTACGGACGCGTCATTATG\n" +
                ">Rosalind_1655\n" +
                "CAGGGCCGGACGTGTTCCAGTAGCGAGGGCGCACAATCACCTAGGGTACCTCATGGCGCA\n" +
                "TTATGCTTGGGATCAACTATA\n" +
                ">Rosalind_3499\n" +
                "ACACGTATCCAACGCCGCTGCCTTTCTCCGTAATACGACGAAGAGGCAACTATTATAATA\n" +
                "CAGGCGGATGGCGACTCGTTTAAGCCCAACGG\n" +
                ">Rosalind_2468\n" +
                "GTGAGACGCGGTTATTTTGTTCGCTCAAAAAGAATGCAGTCTTCTGACGCTCATCTATAC\n" +
                "GGGTTACACACGGTTCGAAGCTAT\n" +
                ">Rosalind_2986\n" +
                "CGAATTCGGGTAGCAGCGCGTAATTGCCCTGCTAAGCTTTCATCTCCACGAACTACTTCT\n" +
                "ACGTCCTGGCCAGCTCACTCACGTCGTAGACACAAAT\n" +
                ">Rosalind_0714\n" +
                "GAGTGTTCAGATGTAAAACTAGGTTAATCCAGTTTGAAATAAAATGCTCCTCATCCAATG\n" +
                "TACGTACGGTGGTGGGCGTATCCCAGTC\n" +
                ">Rosalind_6375\n" +
                "ACTATAGGCATCTGAAGGACGTTTAATCACGCTCCGCAGGTGTAGACGTACTGAGAGACA\n" +
                "TGGACGCGAGTGTGTCGTAAACTGT\n" +
                ">Rosalind_6314\n" +
                "CATCAGTAGATTAGTGTCAACCGAGTAGCATCGTGTCGGTTGCCACTCTGGCAAGTAGGG\n" +
                "GTCTTTAATTCGGCAGTCGCGTACCCAGTAATGCCTTCT\n" +
                ">Rosalind_5740\n" +
                "CCTACTTACAGTTGCGACTTGTATCAAAAACATGAGCGGTCTAGTAGGTAACACGCGCTA\n" +
                "TAAGTTGTGGGTCACGGCCTTAA\n" +
                ">Rosalind_3432\n" +
                "CAACTTTCTCAGGTTTTTGGAGACCACGCGTTCATTCACCGGAAGATTAGTAGTACAAAG\n" +
                "TATCTGTGAACCCCCCGCGAGCCGTAGTGAATC\n" +
                ">Rosalind_2135\n" +
                "CTAGGACAGGTGTGCCTAAGATGGAGCTCAGGATTTGAGAGAGTCTTAGCGTAAACATTT\n" +
                "ACGCAGCCGCCGCCATTGCGATAGCTGGGC\n" +
                ">Rosalind_7612\n" +
                "TGGCACGTGGCTTGGCAATTTAGGCAAGGTTCGCCTATTCAGACGCATAATTTTTTGTAC\n" +
                "AATCGACGCACCCCGAGACGCGCCGTG\n"));
    }

    private static void printResult(List<String> result) {
        for (String r : result) {
            System.out.println(r);
        }
        System.out.println("----------");
    }
}
